Skip to content

refactor(nodes): unify vector stores on a shared StoreBase - #1663

Merged
asclearuc merged 6 commits into
developfrom
feat/store-base
Jul 24, 2026
Merged

asclearuc merged 6 commits into
developfrom
feat/store-base

Conversation

@dsapandora

@dsapandora dsapandora commented Jul 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Introduce StoreGlobalBase / StoreInstanceBase in ai.common.store. The store lifecycle (open the store, wire the control-plane embedder, register the transform key, save-time validation) and the three pipeline lane handlers (writeQuestions / writeDocuments / renderObject) now live once in the base. Each driver keeps only its own specifics through three hooks: _open_store, _sub_key, _probe_connection.
  • Migrate the vector store drivers onto the base: qdrant (the reference the abstraction was extracted from), chroma, pinecone, milvus, postgres, weaviate, astra, atlas. Each IInstance collapses to a two-line subclass; each IGlobal drops its duplicated beginGlobal/endGlobal.
  • Driver specifics stay in the driver, not in the base: collection-name regexes, the SDK connectivity probes and their _format_error helpers, and the non-standard sub-keys (astra endpoint/collection, atlas host/database/collection). The three hooks carry per-driver docstrings.
  • Uniform agent tools. Every migrated store exposes the search / upsert / delete tools via VectorStoreToolMixin. qdrant/chroma/pinecone were already registered as tool nodes; astra/atlas/milvus/postgres/weaviate are now registered too — their services.json gains "tool" in classType, "invoke" in capabilities, and a serverName field (with profile defaults) so multiple nodes of the same kind get distinct tool namespaces. Each README gains the Agent tools section; the generated ## Schema block regenerates on develop.
  • store.py became a store/ package; its __init__.py re-exports the public surface (DocumentStoreBase, VectorStoreToolMixin, getStore) so from ai.common.store import ... keeps working unchanged.

Type

refactor (shared base extraction) + feat (tool registration for five stores) — no .pipe schema, protocol or prefix changes

Testing

  • New packages/ai/tests/ai/common/store/test_store_base.py — 14 tests pinning the shared lifecycle: CONFIG short-circuit, serverName resolution, embedder wiring (None / warn-not-raise), transform-key format, endGlobal cleanup incl. the transform key, and the lane store is None guards
  • Store suite green via engine pytest — 121 passed, 1 pre-existing skip (the seven driver test folders + the vectordb tool-mixin + the new base tests)
  • Full ./builder test runs in CI on this PR

Checklist

  • Commit messages follow conventional commits
  • No secrets or credentials included
  • No runtime break — protocol/prefix unchanged, saved pipes keep resolving
  • Public-contract change documented — five stores registered as tool nodes (services.json + READMEs); Schema tables regenerate on develop

Linked Discussion

Follows the node naming / classType unification work (#1635, #1636). Pinecone's transform sub-key note is tracked separately in #1664.

…e_qdrant

Turn ai.common.store into a package paralleling ai.common.graph and
ai.common.database, and add StoreGlobalBase/StoreInstanceBase so a vector-store
node is a thin driver instead of re-implementing the lifecycle and lanes.

- StoreGlobalBase(IGlobalTransform, ABC): the beginGlobal skeleton (CONFIG guard,
  serverName, embedder wiring, super().beginGlobal), endGlobal, validateConfig.
  Drivers implement _open_store / _sub_key / _probe_connection.
- StoreInstanceBase(VectorStoreToolMixin, IInstanceTransform, ABC): the three
  byte-identical lane handlers (writeQuestions/writeDocuments/renderObject).
  Inheriting the mixin gives every node the search/upsert/delete agent tools
  uniformly — today only 3 of 9 nodes expose them.
- store.py -> store/document_store.py; store/__init__.py re-exports the public
  surface so `from ai.common.store import ...` keeps working.
- Migrate store_qdrant as the pilot: IGlobal 224->153, IInstance 78->32 lines,
  behavior unchanged. The other 8 drivers migrate in follow-ups.
Collapse each IInstance to StoreInstanceBase (shared lane handlers + tool
mixin) and each IGlobal to StoreGlobalBase with three driver hooks:
_open_store, _sub_key, _probe_connection. Per-driver specifics stay in the
driver: collection-name regexes, SDK probes and _format_error helpers, and
the astra/atlas subKey shapes. Data-lane-only drivers (milvus/postgres/
weaviate/astra/atlas) now expose the search/upsert/delete agent tools and a
tool-path embedder uniformly, and drop their duplicated lifecycle. Pinecone
no longer imports its Store at module load (config mode stays driver-free).
Elasticsearch (dual-backend, no shared Store) is deferred to a dedicated PR.
Copilot AI review requested due to automatic review settings July 23, 2026 14:58
@github-actions github-actions Bot added module:nodes Python pipeline nodes module:ai AI/ML modules labels Jul 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor
🤖 Internal: Discord sync marker

Auto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Vector store nodes now use shared StoreGlobalBase and StoreInstanceBase abstractions. Provider globals implement lazy store creation and configuration probes, while provider instances inherit common search, document-write, and rendering handlers.

Changes

Vector store lifecycle consolidation

Layer / File(s) Summary
Shared store base APIs
packages/ai/src/ai/common/store/*
Adds shared global and instance base classes, lifecycle hooks, embedding wiring, validation, cleanup, and pipeline handlers.
Instance handler migration
nodes/src/nodes/store_*/IInstance.py
Changes all vector store instances to inherit StoreInstanceBase, removing duplicated question, document, and rendering implementations.
Provider lifecycle hooks
nodes/src/nodes/store_*/IGlobal.py
Changes provider globals to inherit StoreGlobalBase and implement lazy store construction, sub-key generation, and fixed server identities.
Provider configuration probes
nodes/src/nodes/store_*/IGlobal.py
Moves provider validation into _probe_connection, preserves provider-specific checks, adds error formatting, and removes duplicated teardown methods.
Tool service contracts and validation
nodes/src/nodes/store_*/README.md, nodes/src/nodes/store_*/services.json, packages/ai/tests/ai/common/store/*, nodes/test/test_vectordb_tool_mixin.py
Documents agent tools, adds server-name configuration and invocation metadata, and validates shared lifecycle behavior and packaged imports.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant IGlobal
  participant StoreGlobalBase
  participant ProviderStore
  participant IGlobalTransform
  IGlobal->>StoreGlobalBase: beginGlobal()
  StoreGlobalBase->>IGlobal: _open_store(...)
  IGlobal->>ProviderStore: construct provider store
  StoreGlobalBase->>IGlobal: _sub_key()
  StoreGlobalBase->>IGlobalTransform: beginGlobal(subKey)
Loading

Possibly related PRs

Suggested reviewers: jmaionchi, stepmikhaylov, rod-christensen

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 62.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main refactor toward shared store base classes for vector stores.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/store-base

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the vector-store node implementation by extracting shared IGlobal/IInstance behavior into reusable base classes under ai.common.store, and migrates multiple store_* drivers to thin subclasses that only provide provider-specific hooks.

Changes:

  • Added StoreGlobalBase and StoreInstanceBase to centralize lifecycle, transform-key registration, and common pipeline lane handlers across vector-store nodes.
  • Migrated store_{qdrant,weaviate,postgres,pinecone,milvus,chroma,astra,atlas} nodes to inherit the shared bases and implement only driver hooks (_open_store, _sub_key, _probe_connection).
  • Converted ai.common.store from a module into a package with re-exports, and updated the vectordb tool-mixin test harness to import document_store.py directly.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/ai/src/ai/common/store/store_instance_base.py New shared IInstance base implementing common lane handlers and tool mixin inheritance.
packages/ai/src/ai/common/store/store_global_base.py New shared IGlobal base implementing common lifecycle, optional tool-path embedder wiring, and save-time validation dispatch.
packages/ai/src/ai/common/store/document_store.py Adjusted schema imports to reflect store now being a package (relative import updated).
packages/ai/src/ai/common/store/init.py New package surface re-exporting the public store API to keep imports stable.
nodes/test/test_vectordb_tool_mixin.py Updated isolated import/stubbing to load ai.common.store.document_store from the new package layout.
nodes/src/nodes/store_weaviate/IInstance.py Migrated to StoreInstanceBase.
nodes/src/nodes/store_weaviate/IGlobal.py Migrated to StoreGlobalBase with provider hooks.
nodes/src/nodes/store_qdrant/IInstance.py Migrated to StoreInstanceBase.
nodes/src/nodes/store_qdrant/IGlobal.py Migrated to StoreGlobalBase with provider hooks.
nodes/src/nodes/store_postgres/IInstance.py Migrated to StoreInstanceBase.
nodes/src/nodes/store_postgres/IGlobal.py Migrated to StoreGlobalBase with provider hooks.
nodes/src/nodes/store_pinecone/IInstance.py Migrated to StoreInstanceBase.
nodes/src/nodes/store_pinecone/IGlobal.py Migrated to StoreGlobalBase with provider hooks.
nodes/src/nodes/store_milvus/IInstance.py Migrated to StoreInstanceBase.
nodes/src/nodes/store_milvus/IGlobal.py Migrated to StoreGlobalBase with provider hooks.
nodes/src/nodes/store_chroma/IInstance.py Migrated to StoreInstanceBase.
nodes/src/nodes/store_chroma/IGlobal.py Migrated to StoreGlobalBase with provider hooks (no save-time probe).
nodes/src/nodes/store_atlas/IInstance.py Migrated to StoreInstanceBase.
nodes/src/nodes/store_atlas/IGlobal.py Migrated to StoreGlobalBase with provider hooks.
nodes/src/nodes/store_astra/IInstance.py Migrated to StoreInstanceBase.
nodes/src/nodes/store_astra/IGlobal.py Migrated to StoreGlobalBase with provider hooks.
Comments suppressed due to low confidence (1)

packages/ai/src/ai/common/store/store_instance_base.py:65

  • writeDocuments() calls self.IGlobal.store.addChunks(...) without checking whether self.IGlobal.store is set. Since renderObject() already raises a clear exception when the store is missing, add the same guard here to prevent a less-informative AttributeError.
    def writeDocuments(self, documents: List[Doc]) -> None:
        """Take a list of documents and add them to the vector store.

        Any chunks in the database that have the same object id will be removed.
        """

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nodes/test/test_vectordb_tool_mixin.py Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
nodes/src/nodes/store_atlas/IGlobal.py (1)

74-77: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Warning example contradicts the validation regex.

The regex requires embedded credentials (user:pass@) and a trailing /?…, but the suggested example mongodb+srv://cluster.example.mongodb.net has neither, so a user who copies it will still fail validation. Align the example with what the pattern accepts.

💡 Suggested wording fix
-                warning("Host must be a valid MongoDB URI (e.g., 'mongodb+srv://cluster.example.mongodb.net')")
+                warning(
+                    "Host must be a valid MongoDB SRV URI "
+                    "(e.g., 'mongodb+srv://user:pass@cluster.abc12.mongodb.net/?retryWrites=true')"
+                )
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@nodes/src/nodes/store_atlas/IGlobal.py` around lines 74 - 77, Update the
warning message in the host validation branch of IGlobal.py to show a MongoDB
SRV URI containing credentials and the trailing query delimiter required by
mongodb_uri_pattern, while preserving the existing validation logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@nodes/src/nodes/store_pinecone/IGlobal.py`:
- Around line 47-48: Update IGlobal._sub_key to build the transform key from
Pinecone-specific node configuration, including the API key and
collection/profile metadata that distinguish stores, instead of self.store.host
and self.store.port. Preserve deterministic formatting so identical Pinecone
configurations share a key while different accounts or environments with the
same collection do not.

---

Outside diff comments:
In `@nodes/src/nodes/store_atlas/IGlobal.py`:
- Around line 74-77: Update the warning message in the host validation branch of
IGlobal.py to show a MongoDB SRV URI containing credentials and the trailing
query delimiter required by mongodb_uri_pattern, while preserving the existing
validation logic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 722c9028-63ad-43e6-8a06-4021cd01d7bf

📥 Commits

Reviewing files that changed from the base of the PR and between ddf94dd and a9a0ad4.

📒 Files selected for processing (21)
  • nodes/src/nodes/store_astra/IGlobal.py
  • nodes/src/nodes/store_astra/IInstance.py
  • nodes/src/nodes/store_atlas/IGlobal.py
  • nodes/src/nodes/store_atlas/IInstance.py
  • nodes/src/nodes/store_chroma/IGlobal.py
  • nodes/src/nodes/store_chroma/IInstance.py
  • nodes/src/nodes/store_milvus/IGlobal.py
  • nodes/src/nodes/store_milvus/IInstance.py
  • nodes/src/nodes/store_pinecone/IGlobal.py
  • nodes/src/nodes/store_pinecone/IInstance.py
  • nodes/src/nodes/store_postgres/IGlobal.py
  • nodes/src/nodes/store_postgres/IInstance.py
  • nodes/src/nodes/store_qdrant/IGlobal.py
  • nodes/src/nodes/store_qdrant/IInstance.py
  • nodes/src/nodes/store_weaviate/IGlobal.py
  • nodes/src/nodes/store_weaviate/IInstance.py
  • nodes/test/test_vectordb_tool_mixin.py
  • packages/ai/src/ai/common/store/__init__.py
  • packages/ai/src/ai/common/store/document_store.py
  • packages/ai/src/ai/common/store/store_global_base.py
  • packages/ai/src/ai/common/store/store_instance_base.py

…on teardown

Address review feedback on the store base: writeQuestions/writeDocuments
now raise the same explicit error as renderObject when the store is absent
(restores the guard postgres/astra/atlas carried before the migration), and
endGlobal calls super() so IGlobalTransform clears TRANFORM_KEY_TAG_NAME
instead of leaving it set after teardown. Also refresh stale references to
the pre-package store.py path in the tool-mixin test.
Copilot AI review requested due to automatic review settings July 23, 2026 16:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

nodes/test/test_vectordb_tool_mixin.py:10

  • Docstring still says the tests load store.py, but this test now loads store/document_store.py (see _STORE_PY). Updating the wording avoids confusion when someone is trying to understand what is being imported/stubbed.
"""Unit tests for the VectorStoreToolMixin (packages/ai/src/ai/common/store/document_store.py).

These tests load ``store.py`` in isolation by stubbing its heavy imports
(``rocketlib``, ``ai.common.schema``) so the module can be exercised without
the server runtime. They cover:

@asclearuc asclearuc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dsapandora for putting the store family through the same base-class treatment as graph_* and db_* — collapsing eight near-identical beginGlobal implementations and three copy-pasted lane handlers into one place is clearly the right direction, and the _open_store / _sub_key / _probe_connection split mirrors GraphGlobalBase closely enough that it will read as familiar.

I'm requesting changes on two blocking points: the "uniform agent tools" claim does not hold for store_astra, store_atlas, store_milvus, store_postgres and store_weaviate — their services.json never opts into tool discovery — and 274 lines of new lifecycle code land with no test that exercises them.

Details are in the inline comments. CodeRabbit's store_atlas MongoDB-URI example fix is worth folding in as well; deferring its Pinecone _sub_key note to #1664 looks right to me.

Comment thread nodes/src/nodes/store_chroma/IGlobal.py Resolved
These five stores inherited VectorStoreToolMixin in the base migration but
their services.json never opted into tool discovery, so the search/upsert/
delete tools were unreachable. Add 'tool' to classType and 'invoke' to
capabilities, and give each a serverName field (plus profile defaults) so
two nodes of the same kind in one pipeline get distinct tool namespaces
instead of both answering to e.g. milvus.search. READMEs gain the Agent
tools section; the generated Schema block regenerates on develop.
Pin the six behaviors a regression in the shared base could silently break
across all eight store nodes: CONFIG mode short-circuits before the driver
loads, serverName resolves from merged config (default survives blank/non-
string), the tool-path embedder stays unset without an embedding block and
warns instead of raising, the transform key format, endGlobal clearing state
plus the transform key, and the lane guards raising on a missing store. The
last two are the review-driven fixes from eecfb6d, now regression-tested.
Give the driver hooks (_open_store/_sub_key/_probe_connection) one-line
docstrings matching the graph family, so the base's three-hook public surface
is documented per driver. Also: drop private _normalize_vectordb_tool_input
from the store package __all__ (it stays reachable via document_store), note
why the base passes raw connConfig to _open_store rather than the merged cfg,
and fix the atlas save-time warning to show a MongoDB SRV URI that actually
matches the validation regex (credentials + trailing query).
@github-actions github-actions Bot added the docs Documentation label Jul 24, 2026
@dsapandora

Copy link
Copy Markdown
Collaborator Author

Thanks for the thorough pass, @asclearuc — both blocking points and the nits are addressed. Pushed as three commits:

  • e4cb0c63 — register astra/atlas/milvus/postgres/weaviate as tool nodes (services.json tool/invoke + serverName field with profile defaults, Agent tools section in each README). Went the "finish the wiring" route so the uniform-tools claim actually holds; description updated to match.
  • db0af56c — test_store_base.py, 14 tests covering all six behaviors you listed, including the two eecfb6df fixes (lane guards + endGlobal clearing the transform key).
  • 1a9ab9f9 — hook docstrings across the eight drivers, __all__ cleanup, the raw-config comment, and CodeRabbit's store_atlas MongoDB-URI fix folded in (the warning now shows an SRV URI that matches the regex).

Per-comment replies are in the threads. One follow-up offered rather than done here: making the tool-path embedder lazy (build on first tool call instead of beginGlobal) — it'd help all eight uniformly and is really its own change. Pinecone's sub-key note stays deferred to #1664 as you agreed. The generated ## Schema blocks regenerate on develop (the node-table generator skips feature branches by design).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
nodes/src/nodes/store_weaviate/IGlobal.py (1)

87-105: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Select the probe path from the configured mode.

Store.__init__ uses the configured mode to choose cloud versus local, but this probe classifies every non-local hostname as cloud. A remote self-hosted deployment configured as local will incorrectly call /v1/meta instead of connect_to_local, causing valid configurations to fail or authenticate incorrectly. Use the configured mode for this branch.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@nodes/src/nodes/store_weaviate/IGlobal.py` around lines 87 - 105, Update the
probe logic in Store.__init__ to select the cloud versus local path from the
configured mode rather than inferring it from the hostname. Ensure local mode
invokes connect_to_local even for remote self-hosted hosts, while cloud mode
retains the existing /v1/meta request and API-key handling.
nodes/src/nodes/store_milvus/IGlobal.py (1)

77-96: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Disconnect the validation alias in a finally block.

After get_server_version() returns, the validate alias remains connected. Repeated save-time probes can retain stale connections and leak client resources. Always disconnect the alias after the probe, including failure paths.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@nodes/src/nodes/store_milvus/IGlobal.py` around lines 77 - 96, Update the
validation connection flow in IGlobal.py to wrap the connect and
utility.get_server_version probe for alias “validate” in a finally block that
always calls connections.disconnect(alias), preserving the existing success and
error handling while cleaning up the alias on both successful and failed probes.
nodes/src/nodes/store_pinecone/IGlobal.py (1)

101-110: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Read Pinecone index results using the SDK’s typed index models.

This node pins no Pinecone version, and modern pinecone versions expose list_indexes() as model-backed results: an existing collection’s entry supports index.name / bracket access, but calling .get(...) in the loop raises AttributeError and aborts config validation. Use the SDK’s typed attributes/models consistently, or only rely on the .names convenience helper if that detail is enough for the existing-index check.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@nodes/src/nodes/store_pinecone/IGlobal.py` around lines 101 - 110, Update the
existing-index check in the Pinecone initialization flow around
client.list_indexes() and existing_collection to use the SDK’s typed index model
attributes instead of dict-only get calls. Access the index name and
specification through the supported typed model interface, preserving the
existing serverless-dense compatibility validation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@nodes/src/nodes/store_astra/IGlobal.py`:
- Around line 57-59: Replace the no-op implementation of _probe_connection in
IGlobal with save-time collection-name validation using the same format rule
enforced by astra_db.Store.__init__. Ensure validateConfig rejects invalid
collection names even in CONFIG mode, while preserving the existing successful
no-op behavior for valid names.

In `@nodes/src/nodes/store_astra/README.md`:
- Line 91: Update the embedding-provider documentation in
nodes/src/nodes/store_astra/README.md at lines 91-91 and
nodes/src/nodes/store_atlas/README.md at lines 66-66: state that search falls
back to keyword search when no provider is configured, while automatic upsert
embedding still fails without one. Preserve the existing control-plane and
parameter context.

In `@nodes/src/nodes/store_astra/services.json`:
- Around line 172-178: Regenerate the documentation schemas with
nodes:docs-generate instead of editing generated content manually. Apply this to
nodes/src/nodes/store_astra/services.json:172-178 so store_astra/README.md
includes astra_db.serverName, and
nodes/src/nodes/store_atlas/services.json:101-107 so store_atlas/README.md
includes atlas.serverName.

In `@nodes/src/nodes/store_atlas/IGlobal.py`:
- Around line 75-80: Update the mongodb_uri_pattern validation in the
host-checking logic to accept valid MongoDB SRV URIs with no path, with a path
such as /admin, with a trailing slash, and with optional query parameters.
Preserve validation of the required scheme, credentials, host, and .mongodb.net
domain, and keep the existing warning behavior for invalid values.

In `@packages/ai/tests/ai/common/store/test_store_base.py`:
- Around line 240-249: Update test_lane_handlers_delegate_to_store_when_present
to also exercise the shared render handler: create a vectorized object, stub
inst.sendText and preventDefault as needed, call inst.renderObject(), and assert
the store call kinds include the expected third render delegation alongside
search and add.

---

Outside diff comments:
In `@nodes/src/nodes/store_milvus/IGlobal.py`:
- Around line 77-96: Update the validation connection flow in IGlobal.py to wrap
the connect and utility.get_server_version probe for alias “validate” in a
finally block that always calls connections.disconnect(alias), preserving the
existing success and error handling while cleaning up the alias on both
successful and failed probes.

In `@nodes/src/nodes/store_pinecone/IGlobal.py`:
- Around line 101-110: Update the existing-index check in the Pinecone
initialization flow around client.list_indexes() and existing_collection to use
the SDK’s typed index model attributes instead of dict-only get calls. Access
the index name and specification through the supported typed model interface,
preserving the existing serverless-dense compatibility validation.

In `@nodes/src/nodes/store_weaviate/IGlobal.py`:
- Around line 87-105: Update the probe logic in Store.__init__ to select the
cloud versus local path from the configured mode rather than inferring it from
the hostname. Ensure local mode invokes connect_to_local even for remote
self-hosted hosts, while cloud mode retains the existing /v1/meta request and
API-key handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4ae93e7a-ee23-4e36-9475-12a46841a8b6

📥 Commits

Reviewing files that changed from the base of the PR and between eecfb6d and 1a9ab9f.

📒 Files selected for processing (22)
  • nodes/src/nodes/store_astra/IGlobal.py
  • nodes/src/nodes/store_astra/README.md
  • nodes/src/nodes/store_astra/services.json
  • nodes/src/nodes/store_atlas/IGlobal.py
  • nodes/src/nodes/store_atlas/README.md
  • nodes/src/nodes/store_atlas/services.json
  • nodes/src/nodes/store_chroma/IGlobal.py
  • nodes/src/nodes/store_milvus/IGlobal.py
  • nodes/src/nodes/store_milvus/README.md
  • nodes/src/nodes/store_milvus/services.json
  • nodes/src/nodes/store_pinecone/IGlobal.py
  • nodes/src/nodes/store_postgres/IGlobal.py
  • nodes/src/nodes/store_postgres/README.md
  • nodes/src/nodes/store_postgres/services.json
  • nodes/src/nodes/store_qdrant/IGlobal.py
  • nodes/src/nodes/store_weaviate/IGlobal.py
  • nodes/src/nodes/store_weaviate/README.md
  • nodes/src/nodes/store_weaviate/services.json
  • packages/ai/src/ai/common/store/__init__.py
  • packages/ai/src/ai/common/store/store_global_base.py
  • packages/ai/tests/ai/common/store/__init__.py
  • packages/ai/tests/ai/common/store/test_store_base.py
💤 Files with no reviewable changes (1)
  • packages/ai/src/ai/common/store/init.py

Comment thread nodes/src/nodes/store_astra/IGlobal.py Resolved
Comment thread nodes/src/nodes/store_astra/README.md Resolved
Comment thread nodes/src/nodes/store_atlas/IGlobal.py Resolved
@asclearuc
asclearuc merged commit 3526218 into develop Jul 24, 2026
33 of 34 checks passed
@asclearuc
asclearuc deleted the feat/store-base branch July 24, 2026 14:30
AviNormie pushed a commit to AviNormie/rocketride-server that referenced this pull request Nov 9, 2026
…e-org#1663)

* refactor(ai): extract StoreGlobalBase/StoreInstanceBase; migrate store_qdrant

Turn ai.common.store into a package paralleling ai.common.graph and
ai.common.database, and add StoreGlobalBase/StoreInstanceBase so a vector-store
node is a thin driver instead of re-implementing the lifecycle and lanes.

- StoreGlobalBase(IGlobalTransform, ABC): the beginGlobal skeleton (CONFIG guard,
  serverName, embedder wiring, super().beginGlobal), endGlobal, validateConfig.
  Drivers implement _open_store / _sub_key / _probe_connection.
- StoreInstanceBase(VectorStoreToolMixin, IInstanceTransform, ABC): the three
  byte-identical lane handlers (writeQuestions/writeDocuments/renderObject).
  Inheriting the mixin gives every node the search/upsert/delete agent tools
  uniformly — today only 3 of 9 nodes expose them.
- store.py -> store/document_store.py; store/__init__.py re-exports the public
  surface so `from ai.common.store import ...` keeps working.
- Migrate store_qdrant as the pilot: IGlobal 224->153, IInstance 78->32 lines,
  behavior unchanged. The other 8 drivers migrate in follow-ups.

* refactor(nodes): migrate 7 vector stores onto StoreBase

Collapse each IInstance to StoreInstanceBase (shared lane handlers + tool
mixin) and each IGlobal to StoreGlobalBase with three driver hooks:
_open_store, _sub_key, _probe_connection. Per-driver specifics stay in the
driver: collection-name regexes, SDK probes and _format_error helpers, and
the astra/atlas subKey shapes. Data-lane-only drivers (milvus/postgres/
weaviate/astra/atlas) now expose the search/upsert/delete agent tools and a
tool-path embedder uniformly, and drop their duplicated lifecycle. Pinecone
no longer imports its Store at module load (config mode stays driver-free).
Elasticsearch (dual-backend, no shared Store) is deferred to a dedicated PR.

* fix(ai): guard missing store in shared lanes and clear transform key on teardown

Address review feedback on the store base: writeQuestions/writeDocuments
now raise the same explicit error as renderObject when the store is absent
(restores the guard postgres/astra/atlas carried before the migration), and
endGlobal calls super() so IGlobalTransform clears TRANFORM_KEY_TAG_NAME
instead of leaving it set after teardown. Also refresh stale references to
the pre-package store.py path in the tool-mixin test.

* feat(nodes): register astra/atlas/milvus/postgres/weaviate as tool nodes

These five stores inherited VectorStoreToolMixin in the base migration but
their services.json never opted into tool discovery, so the search/upsert/
delete tools were unreachable. Add 'tool' to classType and 'invoke' to
capabilities, and give each a serverName field (plus profile defaults) so
two nodes of the same kind in one pipeline get distinct tool namespaces
instead of both answering to e.g. milvus.search. READMEs gain the Agent
tools section; the generated Schema block regenerates on develop.

* test(ai): cover StoreGlobalBase/StoreInstanceBase lifecycle

Pin the six behaviors a regression in the shared base could silently break
across all eight store nodes: CONFIG mode short-circuits before the driver
loads, serverName resolves from merged config (default survives blank/non-
string), the tool-path embedder stays unset without an embedding block and
warns instead of raising, the transform key format, endGlobal clearing state
plus the transform key, and the lane guards raising on a missing store. The
last two are the review-driven fixes from eecfb6d, now regression-tested.

* docs(nodes,ai): hook docstrings and review nits

Give the driver hooks (_open_store/_sub_key/_probe_connection) one-line
docstrings matching the graph family, so the base's three-hook public surface
is documented per driver. Also: drop private _normalize_vectordb_tool_input
from the store package __all__ (it stays reachable via document_store), note
why the base passes raw connConfig to _open_store rather than the merged cfg,
and fix the atlas save-time warning to show a MongoDB SRV URI that actually
matches the validation regex (credentials + trailing query).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation module:ai AI/ML modules module:nodes Python pipeline nodes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants